#ifndef HDCONTROLLER_H
#define HDCONTROLLER_H

#include <QObject>
#include "hdobject.h"

class HDController : public QObject
{
	Q_OBJECT

	friend QDataStream &operator<<(QDataStream &, HDController &);
	friend QDataStream &operator>>(QDataStream &, HDController &);
public:
	HDController(QObject *parent, int id);
	~HDController();

	ThreeDimensionPoint* position();
	void setPosition(ThreeDimensionPoint *pos);

	bool thumbPressed();
	void setThumbPressed(bool pressed);

	bool indexPressed();
	void setIndexPressed(bool pressed);

	bool middlePressed();
	void setMiddlePressed(bool pressed);

	bool ringPressed();
	void setRingPressed(bool pressed);

	int GetControllerId();


private:
	int _id;
	
	ThreeDimensionPoint *_position;

	bool _thumbPressed;
	bool _indexPressed;
	bool _middlePressed;
	bool _ringPressed;

signals:
	void controllerMoving(HDController *sender);
	void controllerPressed(HDController *sender);
	void controllerReleased(HDController *sender);
};


#endif // HDCONTROLLER_H
